import os from "os";
export function getHosts() {
  let networkInterfaces = os.networkInterfaces();
  let interfaces = Object.values(networkInterfaces).flat(); // [[],[],[]]
  let address = interfaces
    .filter((net) => net.family === "IPv4")
    .map((item) => item.address);
  return address;
}
